
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php } ?>
<base href="<?php echo $base; ?>" />
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo str_replace('&', '&amp;', $link['href']); ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet2.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/menu.css" />

<!-- 07-09-2012, Background - Coder: Le Chi Son -->
<style>
body{
	background:url("catalog/view/theme/default/image/bgpixel.gif") repeat;	
}
</style>
<!-- 07-09-2012, END Background -->


<div class="div1"  style="height: 60px;position:absolute;">
			<a href="<?php echo $home; ?>"><img src="catalog/view/theme/default/image/netlogo.png" alt="Logo"></a>
	    </div>
<div id="container1">

<div id="top_header_new">
  <div class="div0">
  	<div style="float:left; width: 960px; display: block;">
		<div class="div3" style="background-image:url('catalog/view/theme/default/image/content_top_center.png');">
			<a img src="catalog/view/theme/default/image/content_top_left.png"></a>
			<!--<a href="<?php echo $introduce; ?>" title="Giới thiệu" >Giới thiệu</a>-->
			<a href="<?php echo $account; ?>" title="Thông tin về tài khoản">Tài khoản</a>
			<a href="news" title="Trang tin tức" >Trang tin tức</a>
			<!--<a href="<?php echo $recruitment; ?>" title="Tuyển dụng" >Tuyển dụng</a>-->
			<!--<a href="<?php echo $cart; ?>" title="Giỏ hàng của bạn"><?php echo $text_cart; ?></a>-->
		    <?php if (!$logged) { ?>
				<a>|</a>
			  	<a href="<?php echo $login; ?>" title="Đăng nhập"><?php echo $text_login; ?></a>
			<?php } else { ?>
				 <a>[</a>
				 <?php echo $text_hello;?>
				 <a href="<?php echo $account; ?>"><font color="blue"><b><?php echo $user_id; ?></b></font></a>]
			
			<?php } ?>
		    <?php if (mb_strlen($shopname) > 0 ) { ?>
				<a href="<?php echo $linkshop; ?>" title="Gian hàng của tôi" ><?php echo $text_shop; ?></a>
			<?php } ?>
			<?php if (isset($register)) { ?>
				<a href="<?php echo $register; ?>" title="Đăng ký" ><?php echo $text_register; ?></a>
			<?php } ?>		
		  	<?php if ($logged) { ?>				
				 <a href="<?php echo $logout; ?>" title="Thoát" ><?php echo $text_logout; ?></a>				
			<?php } ?>
			<!--Aug.25-2012 Like facebook button by Le Chi Son-->
			<div style="margin-left:10px;" class="fb-like" data-href="http://facebook.com/99xuvn" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>	
			<!-- End Function -->
			&nbsp;&nbsp;
	    </div>
		<div class="div4" >
			<div class="div11" >
				<div class="search_maintext">
						<?php if ($keyword) { ?>
						<input type="text" onFocus="this.value=''" value="<?php echo $keyword; ?>" id="filter_keyword" />
						<?php } else { ?>
						<input type="text" value="<?php echo $text_keyword; ?>" id="filter_keyword" onclick="this.value = '';" onkeydown="this.style.color = '#000000'" style="color: #999;" />
						<?php } ?>
						<hidden id="filter_category_id" value="0">
					<div class="search_button">
					<a onclick="moduleSearch();" style="padding-right:10px; text-decoration: none; font-weight: bold;"><span><?php echo $button_go; ?></span></a>
					</div>
				</div>
			</div>
		<div style="color: #FFFFFF;">
			<a href="<?php echo $uploadtosell; ?>" class="publish" title="Đăng bán sản phẩm" style="background: url('catalog/view/theme/default/image/publish.png') no-repeat; ">Đăng Bán</a>
			<!-- Hide Carts by LeChiSon -->
			<!--<p><a href="<?php echo $cart; ?>" class="publish" title="Giỏ hàng của bạn" style="background: url('catalog/view/theme/default/image/cart.png') no-repeat; ">Giỏ Hàng</a></p>-->
		</div>		
		</div>
		
  	</div>
<?php include("menu.php");	?>
<!------------------------>
  
  <div class="div6">
      <div id="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
      </div>
  </div>
</div>
</div>
<script type="text/javascript"><!--
function getURLVar(urlVarName) {
	var urlHalves = String(document.location).toLowerCase().split('?');
	var urlVarValue = '';

	if (urlHalves[1]) {
		var urlVars = urlHalves[1].split('&');

		for (var i = 0; i <= (urlVars.length); i++) {
			if (urlVars[i]) {
				var urlVarPair = urlVars[i].split('=');

				if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}

	return urlVarValue;
}

$(document).ready(function() {
	route = getURLVar('route');

	if (!route) {
		$('#tab_home').addClass('selected');
	} else {
		part = route.split('/');

		if (route == 'common/home') {
			$('#tab_home').addClass('selected');
		} else if (route == 'account/login') {
			$('#tab_login').addClass('selected');
		} else if (part[0] == 'account') {
			$('#tab_account').addClass('selected');
		} else if (route == 'checkout/cart') {
			$('#tab_cart').addClass('selected');
		} else if (part[0] == 'checkout') {
			$('#tab_checkout').addClass('selected');
		} else {
			$('#tab_home').addClass('selected');
		}
	}
});
//--></script>
<!--Add code by D-Ngan Aug 25 2012-->
<script type="text/javascript">

$('#filter_keyword').keydown(function(e) {
	if (e.keyCode == 13) {
		moduleSearch();
	}
});
//End code by D-Ngan
function moduleSearch() {
	url = 'index.php?route=product/search';

	var filter_keyword = $('#filter_keyword').attr('value')

	if (filter_keyword) {
		url += '&keyword=' + encodeURIComponent(filter_keyword);
	}

	var filter_category_id = $('#filter_category_id').attr('value');

	if (filter_category_id) {
		url += '&category_id=' + filter_category_id;
	}

	location = url;
}
</script>
<!----------Tan Phat------------------------------------ -->
<!---------------Add code google Anaylysics----------- -->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-33480474-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<!-------------End Tan Phat--------------------------->

<!-----Code google analytics --->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-33931185-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<script type="text/javascript">
$('.switcher').bind('click', function() {
	$(this).find('.option').slideToggle('fast');
});
$('.switcher').bind('mouseleave', function() {
	$(this).find('.option').slideUp('fast');
});
</script>

<!-- Add code View Category by D-Ngan Aug 29 2012-->
<script type="text/javascript">
function getCatalogData(url) {
	$.ajax({
		type: 'post',
		url: url,
		dataType: 'json',
		beforeSend: function() {
			$('#review_title').after('<div style="width: 740px; text-align: center;" class="wait">Hệ thống đang xử lý...<img src="catalog/view/theme/default/image/loading_1.gif" alt="" /></div>');
		},
		complete: function() {
		},
		success: function(data) {
			if (data.error) {
				$('#review_title').after('<div class="warning">' + data.error + '</div>');
			}
			if (data.success) {
				$("#content_home").html(data.html);
				$("#shop_layout_id").html(data.html);
				$("#content").html(data.html);
				$("#content_upload").html(data.html);
			}
		}
	});
}
</script>
<!-- End Add code View Category by D-Ngan Aug 29 2012-->
<!--Apr 11 2012 Facebook Like - Le Chi Son -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!--End fucntion-->